package com.leo.springbootmultithreadbasic.communication.join.demo1;

/**
 * @author Leo
 * @version V1.0
 */
public class MainDemo {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(new MyRunnable());
        thread.start();

        // 阻塞主线程
        thread.join();

        System.out.println("开始执行主线程！");
    }

    /**
     * 测试场景：阻塞主线程
     * 测试结果：
     * 执行顺序为
     * 子线程执行结束
     * 开始执行主线程！
     *
     *
     */
    public static void test() {

    }


}
